package com.gzsxy.esjy.message.channel;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 主题持续监控
 * @author zhangxiaolong
 *
 */
@EnableScheduling
@Component
@ConditionalOnProperty(name="topic.monitor.enabled",havingValue="true",matchIfMissing=true)
public class Monitor {

	
	@Autowired
	private DefaultChannelManager defaultChannelManager ;
	
	
	@Scheduled(cron="${topic.monitor.rate-corn}")
	public void monitor() {
		defaultChannelManager.console();
	}
}
